<template>
    <div class="components__button_box" :class="{ask__button_box: question}" @click="handleFn">
        <span>
            {{title}}
        </span>
    </div>
</template>

<script>
export default {
  props: {
    title: { // Button标题
      type: String,
      default: '你今天想解决什么问题？'
    },
    handleFn: { // 按钮回调
      type: Function,
      default: function () {}
    },
    question: { // 是否是提问按钮
      type: Boolean,
      default: true
    }
  }
}
</script>

<style lang="less" scoped>
@import './../../assets/globalStyles/index.less';

.components__button_box {
  padding: 6px 12px;
  box-sizing: border-box;
  background-color: @defaultButtonBgColor;
  color: @defaultButtonColor;
  border-radius: @defaultBorderRadius;
  font-size: @defaultFontSize;

  display:inline-block; // 根据内容自适应宽度
  *display:inline;
  *zoom:1;

  cursor: pointer;
}

.ask__button_box {
  padding: 12px 36px;
  .defaultQuestionRadius();

  font-weight: 600;

  // 添加渐变色
  background: -webkit-linear-gradient(#29DB57, #20923E); /* Safari 5.1 - 6.0 */
  background: -o-linear-gradient(#29DB57, #20923E); /* Opera 11.1 - 12.0 */
  background: -moz-linear-gradient(#29DB57, #20923E); /* Firefox 3.6 - 15 */
  background: linear-gradient(#29DB57, #20923E); /* 标准的语法 */

  // box-shadow: 0 5px 4px -4px black;
  box-shadow: 0 10px 60px rgba(0, 0, 0, .25);
}
</style>
